﻿using System.Text.Json;
using System.Text.Json.Serialization;
using DimensionsHelper.Common.Utils.Converters;
using DimensionsHelper.ExcelAddIn.Core.Sql;

namespace DimensionsHelper.ExcelAddIn.Core;

[JsonSourceGenerationOptions(
    WriteIndented = true,
    Converters = [typeof(ColorJsonConverter), typeof(ExcelStyleColorJsonConverter)],
    IgnoreReadOnlyFields = true,
    IgnoreReadOnlyProperties = true,
    PropertyNameCaseInsensitive = true,
    UseStringEnumConverter = true,
    ReadCommentHandling = JsonCommentHandling.Skip,
    PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
    NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals)]
[JsonSerializable(typeof(string[]))]
[JsonSerializable(typeof(ScriptSettings))]
[JsonSerializable(typeof(ScriptSettingsTransmission))]
[JsonSerializable(typeof(HeaderIdentifiersTransmission))]
[JsonSerializable(typeof(DataTableSettingsTransmission))]
[JsonSerializable(typeof(Transimission))]
[JsonSerializable(typeof(MessageTransmission))]
[JsonSerializable(typeof(CodeMapSettings))]
[JsonSerializable(typeof(CodeMapSettingsTransmission))]
public partial class JsonContext : JsonSerializerContext;